static void gtk_box_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
+static gboolean gtk_box_draw (GtkWidget *widget,
+ cairo_t *cr);
static void gtk_box_direction_changed (GtkWidget *widget,
GtkTextDirection previous_direction);
object_class->set_property = gtk_box_set_property;
object_class->get_property = gtk_box_get_property;
+ widget_class->draw = gtk_box_draw;
widget_class->size_allocate = gtk_box_size_allocate;
widget_class->get_preferred_width = gtk_box_get_preferred_width;
widget_class->get_preferred_height = gtk_box_get_preferred_height;
}
}
+static gboolean
+gtk_box_draw (GtkWidget *widget,
+ cairo_t *cr)
+{
+ GtkStyleContext *context;
+ GtkAllocation alloc;
+
+ context = gtk_widget_get_style_context (widget);
+ gtk_widget_get_allocation (widget, &alloc);
+
+ gtk_render_background (context, cr, 0, 0, alloc.width, alloc.height);
+ gtk_render_frame (context, cr, 0, 0, alloc.width, alloc.height);
+
+ return GTK_WIDGET_CLASS (gtk_box_parent_class)->draw (widget, cr);
+}
static void
count_expand_children (GtkBox *box,